Optimal. Leaf size=72 \[ \frac{(a-2 b) \sec ^4(e+f x)}{4 f}-\frac{(2 a-b) \sec ^2(e+f x)}{2 f}-\frac{a \log (\cos (e+f x))}{f}+\frac{b \sec ^6(e+f x)}{6 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0619932, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4138, 446, 76} \[ \frac{(a-2 b) \sec ^4(e+f x)}{4 f}-\frac{(2 a-b) \sec ^2(e+f x)}{2 f}-\frac{a \log (\cos (e+f x))}{f}+\frac{b \sec ^6(e+f x)}{6 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4138
Rule 446
Rule 76
Rubi steps
\begin{align*} \int \left (a+b \sec ^2(e+f x)\right ) \tan ^5(e+f x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{\left (1-x^2\right )^2 \left (b+a x^2\right )}{x^7} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{(1-x)^2 (b+a x)}{x^4} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{b}{x^4}+\frac{a-2 b}{x^3}+\frac{-2 a+b}{x^2}+\frac{a}{x}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac{a \log (\cos (e+f x))}{f}-\frac{(2 a-b) \sec ^2(e+f x)}{2 f}+\frac{(a-2 b) \sec ^4(e+f x)}{4 f}+\frac{b \sec ^6(e+f x)}{6 f}\\ \end{align*}
Mathematica [A] time = 0.177252, size = 55, normalized size = 0.76 \[ \frac{b \tan ^6(e+f x)}{6 f}-\frac{a \left (-\tan ^4(e+f x)+2 \tan ^2(e+f x)+4 \log (\cos (e+f x))\right )}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.051, size = 65, normalized size = 0.9 \begin{align*}{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{4}a}{4\,f}}-{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{2}a}{2\,f}}-{\frac{a\ln \left ( \cos \left ( fx+e \right ) \right ) }{f}}+{\frac{b \left ( \sin \left ( fx+e \right ) \right ) ^{6}}{6\,f \left ( \cos \left ( fx+e \right ) \right ) ^{6}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.999829, size = 128, normalized size = 1.78 \begin{align*} -\frac{6 \, a \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - \frac{6 \,{\left (2 \, a - b\right )} \sin \left (f x + e\right )^{4} - 3 \,{\left (7 \, a - 2 \, b\right )} \sin \left (f x + e\right )^{2} + 9 \, a - 2 \, b}{\sin \left (f x + e\right )^{6} - 3 \, \sin \left (f x + e\right )^{4} + 3 \, \sin \left (f x + e\right )^{2} - 1}}{12 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.541261, size = 177, normalized size = 2.46 \begin{align*} -\frac{12 \, a \cos \left (f x + e\right )^{6} \log \left (-\cos \left (f x + e\right )\right ) + 6 \,{\left (2 \, a - b\right )} \cos \left (f x + e\right )^{4} - 3 \,{\left (a - 2 \, b\right )} \cos \left (f x + e\right )^{2} - 2 \, b}{12 \, f \cos \left (f x + e\right )^{6}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 8.28924, size = 116, normalized size = 1.61 \begin{align*} \begin{cases} \frac{a \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac{a \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac{a \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac{b \tan ^{4}{\left (e + f x \right )} \sec ^{2}{\left (e + f x \right )}}{6 f} - \frac{b \tan ^{2}{\left (e + f x \right )} \sec ^{2}{\left (e + f x \right )}}{6 f} + \frac{b \sec ^{2}{\left (e + f x \right )}}{6 f} & \text{for}\: f \neq 0 \\x \left (a + b \sec ^{2}{\left (e \right )}\right ) \tan ^{5}{\left (e \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 3.22155, size = 408, normalized size = 5.67 \begin{align*} \frac{6 \, a \log \left (-\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2\right ) - 6 \, a \log \left (-\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 2\right ) + \frac{11 \, a{\left (\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )}^{3} + 90 \, a{\left (\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )}^{2} + 276 \, a{\left (\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + 280 \, a - 128 \, b}{{\left (\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2\right )}^{3}}}{12 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]